import http from '/@/utils/request'


const base = "/";

export function login(data) {
	return http.request({
		method: 'post',
		url: base + 'login',
		data
	})
}

export function logout(data) {
	return http.request({
		method: 'post',
		url: base + 'logout',
		data
	})
}

export function getMenus() {
	return http.request({
		method: 'get',
		url: base + 'menus',
	})
}

export function getInfo() {
	return http.request({
		method: 'get',
		url: base + 'getUserInfo',
	})
}

export function getTags(data) {
	return http.request({
		method: 'get',
		url: '/config/tags',
		data
	})
}



export function getConfig(data) {
	return http.request({
		method: 'get',
		url: '/config/list',
		data
	})
}


export function saveConfig(data) {
	return http.request({
		method: 'post',
		url: '/config/save',
		data
	})
}

export function getGroup(data) {
	return http.request({
		method: 'get',
		url: '/group/list',
		data
	})
}

export function getGroupValue(data) {
	return http.request({
		method: 'get',
		url: '/group/value/list',
		data
	})
}

export function saveGroupValue(data) {
	return http.request({
		method: 'put',
		url: '/group/value/save',
		data
	})
}


export function deleteGroupValue(data) {
	return http.request({
		method: 'delete',
		url: '/group/value/delete',
		data
	})
}


export function updateGroupValue(data) {
	return http.request({
		method: 'put',
		url: '/group/value/update',
		data
	})
}


export function existsAdmin(data) {
	return http.request({
		method: 'get',
		url: '/exists',
		data
	})
}

export function saveUserAdmin(data) {
	return http.request({
		method: 'post',
		url: '/saveAdmin',
		data
	})
}


export function updateUserInfo(data) {
	return http.request({
		method: 'put',
		url: '/updateUserInfo',
		data
	})
}


export function getSystemAdminList(data) {
	return http.request({
		method: 'get',
		url: '/list',
		data
	})
}


export function addSystemAdmin(data) {
	return http.request({
		method: 'put',
		url: '/add',
		data
	})
}


export function updateSystemAdmin(data) {
	return http.request({
		method: 'put',
		url: '/update',
		data
	})
}

export function deleteSystemAdmin(data) {
	return http.request({
		method: 'delete',
		url: '/delete',
		data
	})
}